package pt.our.angemc.parser;


import org.antlr.runtime.*;
import org.antlr.runtime.tree.*;
import pt.our.angemc.datatypes.Grammar;
import pt.our.angemc.modifications.RemoveUnitaryProductions;


public class __Test__ {

    public static void main(String args[]) throws Exception {
        graalLexer lex = new graalLexer(new ANTLRFileStream("/home/luis/AnGEMC/test/liss"));
        CommonTokenStream tokens = new CommonTokenStream(lex);

        graalParser parser = new graalParser(tokens);
        
        graalParser.grammar_sq_return r = parser.grammar_sq(); 
        CommonTreeNodeStream nodes = new CommonTreeNodeStream(r.getTree());
        
        graalTree walker = new graalTree(nodes);
        try {
            Grammar g = walker.grammar_sq();
            g.calculateMetrics(true);

            System.out.print(g.getFinFout());
        } catch (RecognitionException e) {
            e.printStackTrace();
        }
    }
}